/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

/**
 *
 * @author Young Ran
 */
public class SuccessStory {

    private int id;
    private String name;
    private String story;

    public SuccessStory() {
    }

    public SuccessStory(int id, String name, String story) {
        this.id = id;
        this.name = name;
        this.story = story;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getStory() {
        return story;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setStory(String story) {
        this.story = story;
    }

    @Override
    public String toString() {
        String des;
        if (story.length() < 30 - name.length()) {
            des = story;
        } else {
            des = story.substring(0, 30 - name.length()) + "...";
        };
        return "<html><p style='padding:20px;'><font color='white'><b>" + id + " | " + name + "</b> | " + des + "</font></p></html>";

    }
}
